package Test;

import static org.junit.Assert.assertTrue;

import java.awt.Color;

import org.junit.Test;

import back.Caja;
import back.Celda;
import back.Coordenada;
import back.Destino;

public class CeldaTest {

	@Test
	public void getPosicionTest(){
		
		Celda celda =  new Celda(new Coordenada(1,4));
		
		assertTrue((celda.getPosicion().getX() == 1) && (celda.getPosicion().getY() == 4));
				
	}
	
	public void noMovibleTest(){
		
		Celda celda = new Celda(new Coordenada(1,4));
		Color color = new Color(150,150,0);
		celda.setNoMovible(new Destino(color));
		
		assertTrue(celda.getNoMovible().getClass() == Destino.class);		
	}
	
	public void movibleTest(){
		
		Celda celda = new Celda(new Coordenada(1,4));
		Color color = new Color(150,150,0);
		celda.setMovible(new Caja(color));
		
		assertTrue(celda.getMovible().getClass() == Caja.class);
			
	}
}


